/*
* Copyright (c) 2010-2011 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description: Viewfinder container.
*
*/

#ifndef CAMERALITYVIEWFINDERCONTAINER_H_
#define CAMERALITYVIEWFINDERCONTAINER_H_

#include "cameralitybasecontainer.h"
#include "cameralityviewfinder.h"

class CCameralityViewfinderContainer : 
    public CCameralityBaseContainer, 
    public MCameralityViewfinderObserver
    {
public: // Constructors and destructor
    static CCameralityViewfinderContainer* NewL();
    virtual ~CCameralityViewfinderContainer();

public: // From MCameralityViewfinderObserver
    virtual void ViewfinderStateChanged(
            CCameralityViewfinder::TViewfinderState oldState,
            CCameralityViewfinder::TViewfinderState newState);
    virtual void ViewfinderError(TInt aError);

public: // From CCameralityBaseContainer
    void Show(const TRect& extent);
    void Hide();

private: // Functions from base classes
    void SizeChanged();
    void Draw(const TRect& aRect) const;

private: // Private constructors
    CCameralityViewfinderContainer();
    void ConstructL();

private: //data
    CCameralityViewfinder* iViewfinder;
    TInt iError;
    };

#endif /* CAMERALITYVIEWFINDERCONTAINER_H_ */

// end of file
